home *** CD-ROM | disk | FTP | other *** search
- { locale.library interface structures and definitions }
-
-
- {$I "Include:Exec/Nodes.i"}
- {$I "Include:Exec/Lists.i"}
- {$I "Include:Exec/Libraries.i"}
- {$I "Include:Utility/TagItem.i"}
- {$I "Include:DOS/DOS.i"}
- {$I "Include:Utility/Hooks.i"}
-
- const
- { constants for GetLocaleStr() }
- DAY_1 = 1; { Sunday }
- DAY_2 = 2; { Monday }
- DAY_3 = 3; { Tuesday }
- DAY_4 = 4; { Wednesday }
- DAY_5 = 5; { Thursday }
- DAY_6 = 6; { Friday }
- DAY_7 = 7; { Saturday }
-
- ABDAY_1 = 8 ; { Sun }
- ABDAY_2 = 9 ; { Mon }
- ABDAY_3 = 10; { Tue }
- ABDAY_4 = 11; { Wed }
- ABDAY_5 = 12; { Thu }
- ABDAY_6 = 13; { Fri }
- ABDAY_7 = 14; { Sat }
-
- MON_1 = 15; { January }
- MON_2 = 16; { February }
- MON_3 = 17; { March }
- MON_4 = 18; { April }
- MON_5 = 19; { May }
- MON_6 = 20; { June }
- MON_7 = 21; { July }
- MON_8 = 22; { August }
- MON_9 = 23; { September }
- MON_10 = 24; { October }
- MON_11 = 25; { November }
- MON_12 = 26; { December }
-
- ABMON_1 = 27; { Jan }
- ABMON_2 = 28; { Feb }
- ABMON_3 = 29; { Mar }
- ABMON_4 = 30; { Apr }
- ABMON_5 = 31; { May }
- ABMON_6 = 32; { Jun }
- ABMON_7 = 33; { Jul }
- ABMON_8 = 34; { Aug }
- ABMON_9 = 35; { Sep }
- ABMON_10 = 36; { Oct }
- ABMON_11 = 37; { Nov }
- ABMON_12 = 38; { Dec }
-
- YESSTR = 39; { affirmative response for yes/no queries }
- NOSTR = 40; { negative response for yes/no queries }
-
- AM_STR = 41; { AM }
- PM_STR = 42; { PM }
-
- SOFTHYPHEN = 43; { soft hyphenation }
- HARDHYPHEN = 44; { hard hyphenation }
-
- OPENQUOTE = 45; { start of quoted block }
- CLOSEQUOTE = 46; { end of quoted block }
-
- YESTERDAYSTR = 47; { Yesterday }
- TODAYSTR = 48; { Today }
- TOMORROWSTR = 49; { Tomorrow }
- FUTURESTR = 50; { Future }
-
- MAXSTRMSG = 51; { current number of defined strings }
-
-
- {***************************************************************************}
-
- Type
- { OpenLibrary("locale.library",0) returns a pointer to this structure }
- LocaleBaseRec = Record
- lb_LibNode : Library;
- lb_SysPatches : Boolean; { TRUE if locale installed its patches }
- end;
-
- VAR LocaleBase : Address;
-
- {***************************************************************************}
-
- Type
- { This structure must only be allocated by locale.library and is READ-ONLY! }
- Locale = Record
- loc_LocaleName, { locale's name }
- loc_LanguageName : String; { language of this locale }
- loc_PrefLanguages : Array[0..9] of String; { preferred languages }
- loc_Flags : Integer; { always 0 for now }
-
- loc_CodeSet, { always 0 for now }
- loc_CountryCode, { user's country code }
- loc_TelephoneCode, { country's telephone code }
- loc_GMTOffset : Integer; { minutes from GMT }
- loc_MeasuringSystem, { what measuring system? }
- loc_CalendarType : Byte; { what calendar type? }
- loc_Reserved0 : Array[0..1] of Byte;
-
- loc_DateTimeFormat, { regular date & time format }
- loc_DateFormat, { date format by itself }
- loc_TimeFormat, { time format by itself }
-
- loc_ShortDateTimeFormat, { short date & time format }
- loc_ShortDateFormat, { short date format by itself }
- loc_ShortTimeFormat, { short time format by itself }
-
- { for numeric values }
- loc_DecimalPoint, { character before the decimals }
- loc_GroupSeparator, { separates groups of digits }
- loc_FracGroupSeparator : String; { separates groups of digits }
- loc_Grouping, { size of each group }
- loc_FracGrouping : Address; { size of each group }
-
- { for monetary values }
- loc_MonDecimalPoint,
- loc_MonGroupSeparator,
- loc_MonFracGroupSeparator : String;
- loc_MonGrouping,
- loc_MonFracGrouping : Address;
- loc_MonFracDigits, { digits after the decimal point }
- loc_MonIntFracDigits : Byte; { for international representation }
- loc_Reserved1 : Array[0..1] of Byte;
-
- { for currency symbols }
- loc_MonCS, { currency symbol }
- loc_MonSmallCS, { symbol for small amounts }
- loc_MonIntCS : String; { internationl (ISO 4217) code }
-
- { for positive monetary values }
- loc_MonPositiveSign : String; { indicate positive money value }
- loc_MonPositiveSpaceSep, { determine if separated by space }
- loc_MonPositiveSignPos, { position of positive sign }
- loc_MonPositiveCSPos, { position of currency symbol }
- loc_Reserved2 : Byte;
-
- { for negative monetary values }
- loc_MonNegativeSign : String; { indicate negative money value }
- loc_MonNegativeSpaceSep, { determine if separated by space }
- loc_MonNegativeSignPos, { position of negative sign }
- loc_MonNegativeCSPos, { position of currency symbol }
- loc_Reserved3 : Byte;
- end;
- LocalePtr = ^Locale;
-
- const
- { constants for Locale.loc_MeasuringSystem }
- MS_ISO = 0; { international metric system }
- MS_AMERICAN = 1; { american system }
- MS_IMPERIAL = 2; { imperial system }
- MS_BRITISH = 3; { british system }
-
- { constants for Locale.loc_CalendarType }
- CT_7SUN = 0; { 7 days a week, Sunday is the first day }
- CT_7MON = 1; { 7 days a week, Monday is the first day }
- CT_7TUE = 2; { 7 days a week, Tuesday is the first day }
- CT_7WED = 3; { 7 days a week, Wednesday is the first day }
- CT_7THU = 4; { 7 days a week, Thursday is the first day }
- CT_7FRI = 5; { 7 days a week, Friday is the first day }
- CT_7SAT = 6; { 7 days a week, Saturday is the first day }
-
- { constants for Locale.loc_MonPositiveSpaceSep and Locale.loc_MonNegativeSpaceSep }
- SS_NOSPACE = 0; { cur. symbol is NOT separated from value with a space }
- SS_SPACE = 1; { cur. symbol IS separated from value with a space }
-
- { constants for Locale.loc_MonPositiveSignPos and Locale.loc_MonNegativeSignPos }
- SP_PARENS = 0; { () surround the quantity and currency_symbol }
- SP_PREC_ALL = 1; { sign string comes before amount and symbol }
- SP_SUCC_ALL = 2; { sign string comes after amount and symbol }
- SP_PREC_CURR = 3; { sign string comes right before currency symbol }
- SP_SUCC_CURR = 4; { sign string comes right after currency symbol }
-
- { constants for Locale.loc_MonPositiveCSPos and Locale.loc_MonNegativeCSPos }
- CSP_PRECEDES = 0; { currency symbol comes before value }
- CSP_SUCCEEDS = 1; { currency symbol comes after value }
-
- { elements of the byte arrays pointed to by:
- * Locale.loc_Grouping
- * Locale.loc_FracGrouping
- * Locale.loc_MonGrouping
- * Locale.loc_MonFracGrouping
- * are interpreted as follows:
- *
- * 255 indicates that no further grouping is to be performed
- * 0 indicates that the previous element is to be repeatedly used
- * for the remainder of the digits
- * <other> the number of digits that comprises the current group
- }
-
-
- {***************************************************************************}
-
-
- { Tags for OpenCatalog() }
- OC_TagBase = (TAG_USER + $90000);
- OC_BuiltInLanguage = OC_TagBase+1; { language of built-in strings }
- OC_BuiltInCodeSet = OC_TagBase+2; { code set of built-in strings }
- OC_Version = OC_TagBase+3; { catalog version number required }
- OC_Language = OC_TagBase+4; { preferred language of catalog }
-
-
- {***************************************************************************}
-
-
- { Comparison types for StrnCmp() }
- SC_ASCII = 0;
- SC_COLLATE1 = 1;
- SC_COLLATE2 = 2;
-
-
- {***************************************************************************}
-
- Type
- { This structure must only be allocated by locale.library and is READ-ONLY! }
- Catalog = Record
- cat_Link : Node; { for internal linkage }
- cat_Pad : WORD; { to longword align }
- cat_Language: String; { language of the catalog }
- cat_CodeSet : Integer; { currently always 0 }
- cat_Version : WORD; { version of the catalog }
- cat_Revision: WORD; { revision of the catalog }
- end;
- CatalogPtr = ^Catalog;
-
- {***************************************************************************}
-
- { --- functions in V38 or higher (Release 2.1) --- }
-
- PROCEDURE CloseCatalog(cat : CatalogPtr);
- External;
-
- PROCEDURE CloseLocale(Loc : LocalePtr);
- External;
-
- FUNCTION ConvToLower(Loc : LocalePtr; Character : Address) : Integer;
- External;
-
- FUNCTION ConvToUpper(Loc : LocalePtr; Character : Address) : Integer;
- External;
-
- PROCEDURE FormatDate(Loc : LocalePtr; fmtTemplate : String;
- date : DateStampPtr; putchrfunc : HookPtr;);
- External;
-
- FUNCTION FormatString(Loc : LocalePtr; fmtTemplate : String;
- DataStream : Address; PutChrFunc : HookPtr;) : Address;
- External;
-
- FUNCTION GetCatalogStr(Cat : CatalogPtr; StrNum : Integer; DefaultString : String) : String;
- External;
-
- FUNCTION LOC_IsAlNum(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsAlpha(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsCntrl(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsDigit(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsGraph(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsLower(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsPrint(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsPunct(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsSpace(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsUpper(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION LOC_IsXDigit(Loc : LocalePtr; character : Address) : Boolean;
- External;
-
- FUNCTION OpenCatalogA(Loc : LocalePtr; name : String; TagList : Address) : CatalogPtr;
- External;
-
- FUNCTION OpenLocale(name : String) : LocalePtr;
- External;
-
- FUNCTION ParseDate(Loc : LocalePtr; Date : DateStampPtr;
- fmtTemplate : String; GetCharFunc : HookPtr) : Boolean;
- External;
-
- FUNCTION StrConvert(Loc : LocalePtr; Str : String; Buffer : Address;
- BufferSize, Typ : Integer) : Integer;
- External;
-
- FUNCTION LOC_StrnCmp(Loc : LocalePtr; Str1, Str2 : String; length, Typ : Integer) : Integer;
- External;
-
-
-
-